<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/mui.picker.min.css" />
		<script src="../js/mui.min.js"></script>
		<script src="../js/mui.picker.min.js"></script>
		<style>
			.password{ margin-top:7px; float: right; font-size: 14px;}
			img {
				border-radius: 50%;
			}
			.btn-menu-out {
				margin-top: 10px;
				margin-bottom:0px;
				height: 40px;
				width: 100%;
				text-align: center;
				background-color: #f0ad4e;
			}
			.btn-menu-out a {
				width: 100%;
				line-height: 40px;
				color: #fff;
				display: inline-block;
			}
			.btn-menu-re {
				margin-top: 10px;
				margin-bottom:0px;
				height: 40px;
				width: 100%;
				text-align: center;
				background-color: #F14E41;
			}
			.btn-menu-re a {
				width: 100%;
				line-height: 40px;
				color: #fff;
				display: inline-block;
			}
			.mui-media-body {
				line-height: 42px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">我的</h1>
		</header>
		<div id="content" style="margin-top: 50px;">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media">
					<a href="javascript:;">
						<img id="img" class="mui-media-object mui-pull-right" src="../images/doc_m.png">
						<div class="mui-media-body">头像</div>
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a>姓名<span id="user_name" class="mui-pull-right"></span></a>
				</li>
				<li class="mui-table-view-cell">
					<a>性别<span id="gender" class="mui-pull-right"></span></a>
				</li>
				<li class="mui-table-view-cell">
					<a>身份证号<span id="id_card" class="mui-pull-right"></span></a>
				</li>
				<li class="mui-table-view-cell">
					<a>手机号码<span id="phone" class="mui-pull-right"></span></a>
				</li>
			</ul>
			<p></p>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a>科室<span id="doc_dept" class="mui-pull-right"></span></a>
				</li>
				<li class="mui-table-view-cell">
					<a>就职医院<span id="hosp_name" class="mui-pull-right"></span></a>
				</li>
				<li class="mui-table-view-cell">
					<a>基层账号<span id="basic_user_code" class="mui-pull-right"></span></a>
				</li>
			</ul>
			<div class="btn-menu-out">
				<a href="javaScript:;" id="out" onclick="out()">退出登录</a>
			</div>
			<div class="btn-menu-re">
				<a href="javaScript:;" id="cancle" onclick="cancle()">解除绑定</a>
			</div>
		</div>
		<div id="footer">
			<p></p>
		</div>
		<script src="../js/mui.js"></script>
		<script type="text/javascript">
			mui.init()
			//获取变量
			var self = localStorage.getItem("name")
			var data = JSON.parse(self)
			document.getElementById("user_name").innerText = data.obj.userName;
			document.getElementById("gender").innerText = data.obj.gender;
			document.getElementById("id_card").innerText = data.obj.idCard;
			document.getElementById("phone").innerText = data.obj.phone;
			document.getElementById("doc_dept").innerText = data.obj.docDept;
			document.getElementById("hosp_name").innerText = data.obj.hospName;
			document.getElementById("basic_user_code").innerText = data.obj.userCode;
			//退出登录
			function out(){
				mui.confirm('确定退出登录？', '提示', ['确定', '取消'], function(e) {
					if(e.index == 0) {
						localStorage.clear();
						plus.runtime.restart();
					}
				}, 'div')
			}
			//头像性别
			if(data.obj.gender == "女"){
				document.getElementById("img").src="../images/doc_w.png";
			}else{
				document.getElementById("img").src="../images/doc_m.png";
			}
			//清空账号
			//function cancle(){
			//	"/mobile/sys/DoctorUser/addOrUpdate"
			//}
		</script>
	</body>
</html>
